package com.wuchao.dubbo_custom.controller;

import dao.UserDao;
import domian.User;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Reference
    private UserDao userDao;
    @GetMapping("/get")
    public List<User>findAll() {
        List<User> all = userDao.findAll();
        System.out.println(all);
        return all;
    }
}
